1. Field of the Invention
The present invention relates generally to the field of systems for optimizing data storage in computers. More specifically, the present invention discloses a system for modifying JCL statements to optimize data storage allocations based on historical space requirements for each dataset.
2. Statement of the Problem
Many mainframe computers used in business environments run batch jobs controlled by job control language (JCL) statements. The JCL statements provide instructions to the computer operating system specifying each program to be executed and the defining the datasets that will be used by the program. A JCL statement typically defines a dataset in terms of its name, physical data storage device, size, and other parameters required by the operating system.
It is common practice for a set of JCL statements to be written at the time a new application is first installed. The requested data storage allocations and other parameters for each dataset are based on the estimated needs of the job, before information on the actual data requirements of the job is available. Programmers writing JCL statements tend to err on the side of requesting too much space for each dataset to prevent errors during job execution. This can result in JCL statements that request space allocations that are several times larger than the actual space requirements for datasets.
After initial installation, batch jobs are typically run on a periodic basis according to the needs of the particular business (e.g., to generate invoices or paychecks). The JCL statements initially created for a job are often reused without change whenever the job is run due to the difficulty of writing and debugging JCL statements. As a result, JCL statements containing inflated or inaccurate data storage allocation requests continue to be used indefinitely, even after the application has been run for many years.
The prior art includes systems that monitor actual data storage requirements for datasets and generate statistical reports. For example, the IBM data facilities storage management system (DFSMS) includes a section that analyzes actual data storage requirements for datasets and generates reports. Sterling Software and Boole & Babbage also offer programs to analyze usage patterns and generate reports. However, these prior art systems do not optimize JCL statements. The JCL programmer must review and understand the printed report and make appropriate revisions to the JCL statements for each job.
A somewhat different, but related problem arises from the need to manage the migration of datasets. For example, disk datasets are often periodically moved to tape for archival purposes. Tape datasets may be stored on-site for period of time and then purged or moved off-site for archival storage. Similarly, archival tape datasets are generally purged after some period of time. Many facilities handle this problem of dataset migration on an ad hoc basis or according to historical practices that may, or may not accurately reflect an optimal dataset migration strategy based on actual use patterns for each dataset or class of datasets.
3. Solution to the Problem
The present invention provides a system for monitoring actual data storage requirements for each dataset and automatically modifying JCL statements to include space allocations based on historical requirements for each dataset. This can be accomplished either by directly modifying the space allocation requests in such JCL statements or by replacing these JCL parameters with an appropriate DATACLAS parameter based on the historical space requirements of the dataset. The present invention can also be used to monitor actual use patterns for each dataset and automatically modify JCL statements to include an appropriate MGMTCLAS parameter governing dataset migration.